﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ChurchData.Utility
{
    public partial class TwoQuestionDialog : Form
    {
        public bool Button1Clicked { get; set; }
        public bool Button2Clicked { get; set; }

        public TwoQuestionDialog(string headerText, string button1Text, string button2Text, bool showCancel)
        {
            InitializeComponent();

            this.Text = headerText;

            button1.Text = button1Text;
            button2.Text = button2Text;

            if (showCancel)
                btnCancel.Visible = true;
            else
                btnCancel.Visible = false;

            // Starting out they have not made a selection
            this.Button1Clicked = false;
            this.Button2Clicked = false;
            this.DialogResult = DialogResult.Cancel;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Button2Clicked = true;
            this.DialogResult = DialogResult.OK;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Button1Clicked = true;
            this.DialogResult = DialogResult.OK;
        }
    }
}
